#include "inc.h"
#include "parser.h"

int main()
{
    int index = 0;
    int last_index = 0;
    char input_buf[512];
    ASTNode *ast_node;

    // strncpy(input_buf, STMT_SELECT, strlen(STMT_SELECT) + 1);
    // strncpy(input_buf, STMT_UPDATE, strlen(STMT_UPDATE) + 1);
    // strncpy(input_buf, STMT_DELETE, strlen(STMT_DELETE) + 1);
    strncpy(input_buf, STMT_INSERT, strlen(STMT_INSERT) + 1);

    printf("~ %s ~\n", input_buf);

    ast_node = parseSQL(input_buf, &index, &last_index);
    printAST(ast_node, 0);
    destroyAST(ast_node);

    return 0;
}